package example_8;

public class Work implements Runnable{

	private int total = 0;;
	public int getTotal() {
		return total;
	}
	@Override
	public void run() {
	        synchronized (this) {
	            for (int i = 0; i < 100; i++) {
	                total += i;
	            }
	            notify();
	        }
	}
	
}
